package com.bops.cons;

public enum NewTypeEnum {

	  HANGYE("行业新闻", 1), GONGSI("公司新闻", 2), QITA("其它司新闻", 3);

	    private String  name;
	    private Integer value;

	    private NewTypeEnum(String name, Integer value) {
	        this.name = name;
	        this.value = value;
	    }

	    public String getName() {
	        return name;
	    }

	    public void setName(String name) {
	        this.name = name;
	    }

	    public Integer getValue() {
	        return value;
	    }

	    public void setValue(Integer value) {
	        this.value = value;
	    }

	    /**
	     * 根据value获取销售状态的类型
	     */
	    public static String getEnum(Integer value) {
	        for (NewTypeEnum typeEnum : values()) {
	            if (typeEnum.getValue()==value) {
	                return typeEnum.getName();
	            }
	        }
	        return null;
	    }
	
}
